Skip to content

fix(doctor): --format only accepted text/json, rejected compact/markdown/ai/sarif/graphml - #215

Merged
Wolfvin merged 1 commit into
mainfrom
fix/doctor-format-choices
Jul 12, 2026
Merged

fix(doctor): --format only accepted text/json, rejected compact/markdown/ai/sarif/graphml#215
Wolfvin merged 1 commit into
mainfrom
fix/doctor-format-choices

Conversation

@Wolfvin

@Wolfvin Wolfvin commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Found while auditing doctor command against KDS backend — codelens doctor . --format compact errored with invalid choice: 'compact'.

Every other umbrella command accepts the global 6-way --format choice list. doctor.py redefined --format locally with choices=['text','json'] only — inconsistent with the documented convention that --format compact is the recommended token-efficient default.

Fix: widen local choices to the full global list; update dispatch logic so any non-'text' format is handed to the shared top-level formatter, same as every other command. Verified --format compact now works and returns proper compact JSON.

Test suite: 12 pre-existing failures in test_doctor.py (schema drift, already documented in CONTEXT.md) confirmed unrelated — same failures present on main before this change.

@Wolfvin
Wolfvin merged commit f536aa8 into main Jul 12, 2026
@Wolfvin
Wolfvin deleted the fix/doctor-format-choices branch July 12, 2026 02:36
…own/ai/sarif/graphml

Every other umbrella command accepts the global 6-way --format choice list
(json/markdown/ai/sarif/compact/graphml). doctor.py redefined --format
locally with choices=['text','json'] only, so 'codelens doctor . --format
compact' errored with 'invalid choice: compact' — inconsistent with the
documented convention (--format compact is the recommended token-efficient
default for AI agent consumption per README/CONTEXT.md).

Found via real-codebase validation while auditing doctor against KDS
backend.

Fix: widen local choices to the full global list; update the fmt
fallback/dispatch logic so any non-'text' format (not just 'json') is
handed to the shared top-level formatter, same as every other umbrella
command.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant